/* eslint-disable */
/**
* @param {Egg.Application} app - egg application
*/
module.exports = app => {
    const { router, controller } = app;

    router.resources('user', '/user', controller.user);
    router.resources('admin', '/admin', controller.admin);

    router.resources('feedback', '/feedback', controller.feedback);
    router.resources('categories', '/categories', controller.categories);
    router.resources('outfit', '/outfit', controller.outfit);


    router.post('/admin/login', controller.admin.login);
    router.post('/admin/register', controller.admin.register);

    router.post('/generateCode', controller.captcha.generateCaptcha);
    router.post('/validateCode', controller.captcha.validateCaptcha);

    router.put('/outfit/:id/approve', controller.outfit.approveOutfit);
    router.post('/upload', controller.file.upload);
    // router.put( '/user/:id/password', controller.user.updatePassword)

    // router.get('userinfo',checkToken(),controller.user.getUserInfo)
    // router.get('/userinfo',controller.user.getUserInfo)

    // router.put('/user/:id/password', controller.user.updatePassword);
};